﻿// Decompiled with JetBrains decompiler
// Type: DnProcessSimulateCommands.ExportToRTR.CApEportToRTRStatusIssueBuilderToolTipString
// Assembly: DnProcessSimulateCommands, Version=2402.0.0.890, Culture=neutral, PublicKeyToken=null
// MVID: A885D881-AEDF-447E-852A-6F13102E089C
// Assembly location: C:\Program Files\Tecnomatix_2402\eMPower\DotNetCommands\DnProcessSimulateCommands.dll

using DnProcessSimulateCommands.ExportToRTR.Resources;
using System.Collections.Generic;
using System.Text;


namespace DnProcessSimulateCommands.ExportToRTR{

internal class CApEportToRTRStatusIssueBuilderToolTipString : CApExportToRTRStatusIssueBuilder
{
  private StringBuilder m_statusBuilder;
  private int m_numberOfLineBreaks;
  private static string[] m_statusMetaData = new string[21]
  {
    string.Empty,
    string.Empty,
    string.Empty,
    string.Empty,
    string.Empty,
    string.Empty,
    string.Empty,
    ExportToRTRStringTable.ISSUE07_TOOL_TIP_CAN_NOT_REACH,
    ExportToRTRStringTable.ISSUE08_TOOL_TIP_NO_CONFIG,
    ExportToRTRStringTable.ISSUE09_TOOL_TIP_COLLISION,
    string.Empty,
    string.Empty,
    string.Empty,
    string.Empty,
    string.Empty,
    string.Empty,
    string.Empty,
    ExportToRTRStringTable.ISSUE17_TOOL_TIP_OPERATION_SIMULATED_ROBOT_MISSING,
    ExportToRTRStringTable.ISSUE18_TOOL_TIP_OPERATION_SIMULATED_ROBOT_BLANKED,
    ExportToRTRStringTable.ISSUE19_TOOL_TIP_OPERATION_SIMULATED_ROBOT_7_AXIS,
    string.Empty
  };

  internal CApEportToRTRStatusIssueBuilderToolTipString(StringBuilder statusBuilder)
  {
    this.m_statusBuilder = statusBuilder;
  }

  internal override void AppendObject(
    CApExportToRTRStatusManager.IssueType type,
    CApExportToRTRStatusObjectIssueData data)
  {
  }

  internal override void AppendObjectList(
    CApExportToRTRStatusManager.IssueType type,
    HashSet<CApExportToRTRStatusObjectIssueData> dataList)
  {
  }

  internal override void AppendTitle(
    CApExportToRTRStatusManager.IssueType type,
    CApExportToRTRStatusManager.Severity severity,
    string additionalData = null)
  {
    string str = CApEportToRTRStatusIssueBuilderToolTipString.m_statusMetaData[(int) type];
    if (severity == CApExportToRTRStatusManager.Severity.Error)
    {
      this.m_statusBuilder.Append("❌ " + str);
    }
    else
    {
      if (severity != CApExportToRTRStatusManager.Severity.Warning)
        return;
      this.m_statusBuilder.Append("⚠ " + str);
    }
  }

  internal override void PreAppendNextObjectList() => this.m_statusBuilder.Append("\n");

  internal override CApExportToRTRStatusIssueBuilder ScopeBuilder
  {
    get
    {
      return (CApExportToRTRStatusIssueBuilder) new CApEportToRTRStatusIssueBuilderScopeToolTipString(this.m_statusBuilder);
    }
  }
}
